<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/update/index" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>
  <div class="page">
    <div class="page-hd">
      <h1>版本升级</h1>
    </div>

    <if condition="empty($list)">
      <p>您的版本已是最新版本</p>
      <else/>
      <div class="datas">
        <div class="datas-bd">

          <table class="table">
            <thead>
              <tr class="ti">
                <th style="">当前版本</th>
                <th style="">更新日期</th>
                <th style="">最新版本</th>
                <th style="">操作</th>
              </tr>
            </thead>
            <tbody>

              <volist name="list" id="list">
                <tr style="text-align: left;">
                  <td>{$listold['title']}</td>
                  <td>{$listold['date']|date="Y-m-d",###}</td>
                  <td>
                    <font color='#5c7a29'>{$list['title']}</font>
                  </td>
                  <td>
                    <if condition="$nowkey eq $key">
                      <input class="btn_b" type="button" name="Button" value="升级" onClick="updateNow('{$list.zip}','{$key}')">
                      <else />
                      <input class="btn_b" type="button" name="Button" value="升级" onClick="updatePre('{$pretitle}')">
                    </if>
                  </td>
                </tr>
              </volist>
            </tbody>

          </table>
        </div>
      </div>
    </if>

    <div class="so_main">
      <div id="page_tit">
        <br>
        <h3>应用升级</h3>
        <br>
      </div>
      <div class="form2 list">
        <table width="100%" cellspacing="0" cellpadding="0" border="0">
          <if condition="empty($result)">
            当前应用以是最新版本
            <else/>
            <tr class="ti">
              <th class="line_1">应用名称</th>
              <th style="">当前版本</th>
              <th style="">最新版本</th>
              <th style="">操作</th>
            </tr>
            <volist name="x" id="x">
              <tr style="text-align: left;">
                <if condition="empty($result[$key]['version'])">
                  <else/>
                  <td>{$key}</td>
                  <td>{$x}</td>
                  <td>
                    <font color='#5c7a29'>{$result[$key]['title']}</font>
                  </td>
                  <td>
                    <input class="btn_b" type="button" name="Button" value="升级" onClick="updateAppNow('{$result[$key][\'version\']}','{$result[$key][\'zip\']}','{$key}')">
                  </td>
                </if>
              </tr>
            </volist>
          </if>
        </table>
      </div>
    </div>

    <div class="so_main">
      <div id="page_tit">
        <br>
        <h3>插件升级</h3>
        <br>
      </div>
      <div class="form2 list">
        <table width="100%" cellspacing="0" cellpadding="0" border="0">
          <if condition="empty($resultPlugin)">
            当前应用以是最新版本
            <else/>
            <tr class="ti">
              <th class="line_1">插件名称</th>
              <th style="">当前版本</th>
              <th style="">最新版本</th>
              <th style="">操作</th>
            </tr>
            <volist name="xs" id="xs">
              <tr style="text-align: left;">
                <if condition="empty($resultPlugin[$key]['version'])">
                  <else/>
                  <td>{$key}</td>
                  <td>{$xs}</td>
                  <td>
                    <font color='#5c7a29'>{$resultPlugin[$key]['version']}</font>
                  </td>
                  <td>
                    <input class="btn_b" type="button" name="Button" value="升级" onClick="updatePluginNow('{$resultPlugin[$key][\'version\']}','{$resultPlugin[$key][\'zip\']}','{$key}')">
                  </td>
                </if>
              </tr>
            </volist>
          </if>
        </table>
      </div>
    </div>
  </div>
</body>

</html>
